package com.caixin.infrastructure.repository.user.convert;

import com.caixin.domain.user.agg.User;
import com.caixin.infrastructure.dataobject.user.entity.UserDO;
import com.caixin.service.user.dto.UserVerifyDTO;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;


@org.mapstruct.Mapper(componentModel = "spring")
public interface UserConvert {

    UserConvert INSTANCE= Mappers.getMapper(UserConvert.class);

    @Mapping(source = "userPassword", target = "userPassword")
    UserDO toUserDO(User domain);

    User userFormat(UserDO userDO);

    UserVerifyDTO toUserVerifyDTO(UserDO userDO);
}
